home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / dev / misc / FidoLib.lha / FidoLib / fidonet.doc < prev    next >
Encoding:
Text File  |  1996-03-20  |  4.4 KB  |  163 lines

  1. TABLE OF CONTENTS
  2.  
  3. fidonet.lib/atos
  4. fidonet.lib/ClosePkt
  5. fidonet.lib/MakeMsg
  6. fidonet.lib/MakePkt
  7. fidonet.lib/stoa
  8.  
  9. fidonet.lib/atos                                        fidonet.lib/atos
  10.  
  11.    NAME
  12.         atos -- convert a fidonet address from structure to string
  13.  
  14.    SYNOPSIS
  15.         addr = atos(address)
  16.  
  17.         u_char *atos(struct NetAddr *)
  18.  
  19.    FUNCTION
  20.         This is a utility function used by the main functions of the
  21.         library and also accessible directly by the application. It
  22.         reads a fidonet address from an address structure and writes
  23.         an address string into a buffer. The buffer is static, and the
  24.         string will be valid until the next call to this function.
  25.  
  26.    INPUTS
  27.         address - pointer to the address structure to read from
  28.  
  29.    RESULT
  30.         addr- pointer to the created address string
  31.  
  32.    BUGS
  33.  
  34.    SEE ALSO
  35.         stoa(),include/fidonet.h
  36.  
  37. fidonet.lib/ClosePkt                                    fidonet.lib/ClosePkt
  38.  
  39.    NAME
  40.         ClosePkt -- Close the given fidonet packet
  41.  
  42.    SYNOPSIS
  43.         ClosePkt(pkt)
  44.  
  45.         void ClosePkt(BPTR)
  46.  
  47.    FUNCTION
  48.         To close a fidonet packet made by a call to MakePkt(). The
  49.         necessary information indicating the ending of the packet is
  50.         written to the packet file, and then the file is closed.
  51.  
  52.    INPUTS
  53.         pkt - file handle to the packet
  54.  
  55.    RESULT
  56.  
  57.    BUGS
  58.  
  59.    SEE ALSO
  60.         MakePkt()
  61.  
  62.  
  63. fidonet.lib/MakeMsg                                     fidonet.lib/MakeMsg
  64.  
  65.    NAME
  66.         MakeMsg -- Start a new message
  67.  
  68.    SYNOPSIS
  69.         MakeMsg(pkt, datetime, flags)
  70.  
  71.         void MakeMsg(BPTR, u_char *, UWORD)
  72.  
  73.    FUNCTION
  74.         Write a message header to the packet file. Pass the function
  75.         the current time as a valid date string. After calling this
  76.         function it is up to you to write the actual message to the
  77.         file. Finally, call MakeMsg() again to create a new message,
  78.         or call ClosePkt() to finish the packet.
  79.  
  80.         If you do not have a ready-made date string and you do not want
  81.         to produce one, you may pass NULL as datetime, and the library
  82.         will call DateStamp() to get the current time and then create
  83.         a date string accordingly.
  84.  
  85.    INPUTS
  86.         pkt      - file handle to the packet
  87.         datetime - valid Fidonet date string or NULL
  88.         flags    - the attribute word of the message
  89.  
  90.    RESULT
  91.  
  92.    BUGS
  93.  
  94.    SEE ALSO
  95.         ClosePkt(),include/fidonet.h
  96.  
  97.  
  98. fidonet.lib/MakePkt                                     fidonet.lib/MakePkt
  99.  
  100.    NAME
  101.         MakePkt -- Initialize a fidonet packet
  102.  
  103.    SYNOPSIS
  104.         pkt = MakePkt(pktname, From, To, password)
  105.  
  106.         BPTR MakePkt(u_char *, u_char *, u_char *, u_char *);
  107.  
  108.    FUNCTION
  109.         Open a packet file, and write a packet header in it. If you
  110.         do not want to put in a password, pass NULL as the final argument.
  111.         For example, MakePkt("T:00000000.PKT","65:10/5","65:10/1","pw")
  112.         would create a packet in the temporary directory that would be
  113.         going from 65:10/5 to 65:10/1. Password would be "pw". The packet
  114.         header will be fully initialized with the addresses given and the
  115.         current time as the packet's time of creation.
  116.  
  117.    INPUTS
  118.         pktname  - name of the packet file (eg. 123AE01F.PKT)
  119.         From     - Fidonet address of the Origin system
  120.         To       - Fidonet address of the Destination system
  121.         password - optional packet password
  122.  
  123.    RESULT
  124.         pkt - file handle to the newly created fidonet packet
  125.  
  126.    BUGS
  127.         If you want to see this as one, the function leaves the product
  128.         code fields to zero. Currently, there is no way of specifying a
  129.         product code.
  130.  
  131.    SEE ALSO
  132.         ClosePkt(),MakeMsg(),include/fidonet.h
  133.  
  134.  
  135. fidonet.lib/stoa                                        fidonet.lib/stoa
  136.  
  137.    NAME
  138.         stoa -- convert a fidonet address from string to structure
  139.  
  140.    SYNOPSIS
  141.         success = stoa(addr, address)
  142.  
  143.         BOOL stoa(u_char *, struct NetAddr *)
  144.  
  145.    FUNCTION
  146.         This is a utility function used by the main functions of the
  147.         library and also accessible directly by the application. It
  148.         parses a fidonet address from a string and write it into the
  149.         address structure.
  150.  
  151.    INPUTS
  152.         addr    - address string
  153.         address - pointer to the address structure to be filled
  154.  
  155.    RESULT
  156.         success - zero if OK, and the structure is valid
  157.  
  158.    BUGS
  159.  
  160.    SEE ALSO
  161.         atos(),include/fidonet.h
  162.  
  163.